<?php
namespace Amis\form;
class InputDatetime extends FormItem
{
    public string $type = 'input-datetime';

    /**
     * 默认值
     * @param $value
     * @return $this
     */
    public function value($value)
    {
        $this->value = $value;
        return $this;
    }

    public function format(string $format = 'X')
    {
        $this->format = $format;
        return $this;
    }

    public function inputFormat(string $inputFormat = 'YYYY-DD-MM HH:mm:ss')
    {
        $this->inputFormat = $inputFormat;
        return $this;
    }

    public function placeholder(string $placeholder = '请选择日期')
    {
        $this->placeholder = $placeholder;
        return $this;
    }

    public function shortcuts(string $shortcuts)
    {
        $this->shortcuts = $shortcuts;
        return $this;
    }

    public function minDate(string $minDate)
    {
        $this->minDate = $minDate;
        return $this;
    }

    public function maxDate(string $maxDate)
    {
        $this->maxDate = $maxDate;
        return $this;
    }

    public function utc(bool $utc = false)
    {
        $this->utc = $utc;
        return $this;
    }

    public function clearable(bool $clearable = true)
    {
        $this->clearable = $clearable;
        return $this;
    }

    public function embed(bool $embed = false)
    {
        $this->embed = $embed;
        return $this;
    }

    public function timeConstraints(bool $timeConstraints = false)
    {
        $this->timeConstraints = $timeConstraints;
        return $this;
    }
}